<template>
  <div class="opFix1">
    <!-- 处方编号 -->
    <section class="c_bh">
      <div>
        <!-- <i class="iconfont icon-fanhui kaiyaofang" @click="$router.back(-1)"></i> -->
        <!-- 返回按扭
        <span>
          <svg @click="$router.back(-1)" viewBox="0 0 1024 1024" fill="#666" class="icon" style="" width="15" height="15"><defs><style type="text/css"></style></defs><path d="M740.072727 1024L242.036364 521.309091c-4.654545-4.654545-4.654545-13.963636 0-23.272727L740.072727 0l46.545455 46.545455-465.454546 465.454545 465.454546 465.454545-46.545455 46.545455z" ></path></svg>
        </span> -->
        <span>NO.{{prescribeNum}}
        </span>
      </div>
    </section>


    <!-- 医院信息 -->
    <section class="c_nav_hospitalname">
<<<<<<< HEAD
      <span class="hosname">{{hospitalName}}</span>
    </section>
    <section class="c_nav_chufang">
      <span>
        <span>     </span>
      </span>
      <span>
        <span>西药 处方笺</span>
      </span>
      <span>
        <span @click="openCfmb()" class="c_nav_lishichufang">历史处方</span>
      </span>
=======
      <div>
        <div>
          <span>{{hospitalName}}</span>
        </div>
        <div>
          <span><!-- 部局占位用 -->AAAAAAA
          </span>
          <span>
            <span>西药 处方笺</span>
          </span>
          <span><!--
            <span>
              <svg fill="blue" class="icon" style="" viewBox="0 0 1024 1024" width="20" height="20"><defs><style type="text/css"></style></defs><path d="M731.0336 859.8528V164.1472c0-40.1408-48.5376-60.3136-77.0048-31.8464L306.176 480.1536c-17.6128 17.6128-17.6128 46.1824 0 63.7952l347.8528 347.8528c28.4672 28.3648 77.0048 8.2944 77.0048-31.9488z"></path></svg>
              <svg class="icon" style="" viewBox="0 0 1024 1024" width="18" height="18"><defs><style type="text/css"></style></defs><path d="M446.4 289.81333333c6.72-6.4 10.02666667-14.4 10.02666667-24.10666666q0-29.97333333-35.94666667-29.97333334h-24v63.78666667h23.14666667c11.09333333 0 19.94666667-3.2 26.77333333-9.70666667z" fill="#888888"></path><path d="M966.72 338.77333333l-0.74666667-4.16-79.04-191.14666666a98.13333333 98.13333333 0 0 0-92.90666666-62.4H244.58666667a95.68 95.68 0 0 0-94.29333334 60.58666666l-84.26666666 193.92-0.74666667 3.94666667a172.05333333 172.05333333 0 0 0-8.85333333 54.50666667 175.78666667 175.78666667 0 0 0 57.49333333 129.38666666l0.21333333 335.89333334a85.01333333 85.01333333 0 0 0 85.01333334 83.73333333h1.17333333l631.89333333-0.32h0.74666667a85.54666667 85.54666667 0 0 0 85.44-83.84V522.56a176.53333333 176.53333333 0 0 0 57.38666667-129.28 172.26666667 172.26666667 0 0 0-9.06666667-54.50666667zM542.29333333 203.84h55.78666667l32.10666667 65.81333333a111.14666667 111.14666667 0 0 1 6.61333333 17.70666667h0.53333333c1.92-5.76 4.26666667-11.94666667 7.04-18.45333333l35.41333334-65.06666667h51.2L666.02666667 310.4l66.56 108.26666667h-54.29333334l-38.61333333-71.25333334c-1.38666667-2.56-2.77333333-7.25333333-4.26666667-13.97333333h-0.53333333a103.25333333 103.25333333 0 0 1-5.01333333 14.4l-38.72 70.82666667h-54.72l68.90666666-107.41333334z m-192.96-4.05333333h77.65333334q79.04 0 79.04 60.05333333c0 15.14666667-4.37333333 28.05333333-13.22666667 38.82666667s-20.90666667 18.34666667-36.37333333 22.72v0.53333333c10.24 3.52 21.54666667 14.72 33.92 33.81333333l41.70666666 65.70666667h-54.29333333L442.98666667 363.73333333q-10.77333333-17.92-17.6-23.04a23.89333333 23.89333333 0 0 0-14.61333334-5.12h-14.29333333v85.86666667h-47.14666667z m482.77333334 685.44l-632.96 0.32c-15.04 0-27.41333333-12.16-27.62666667-26.24V558.29333333a184.10666667 184.10666667 0 0 0 67.41333333 11.41333334v0.21333333h0.42666667a184.42666667 184.42666667 0 0 0 138.66666667-63.25333333 182.93333333 182.93333333 0 0 0 137.92 62.82666666h0.96a182.50666667 182.50666667 0 0 0 137.38666666-63.14666666A183.04 183.04 0 0 0 793.6 569.06666667h0.64a184.64 184.64 0 0 0 66.66666667-11.41333334v300.16c-0.32 15.04-12.8 27.41333333-28.8 27.41333334z" fill="#888888"></path><path d="M455.14666667 579.94666667c-21.54666667 0-40.96 8.53333333-56 23.68l-101.33333334 101.33333333a77.97333333 77.97333333 0 0 0 0 109.86666667c15.14666667 15.14666667 34.56 23.68 56.10666667 23.68s40.96-8.53333333 56-23.68l101.33333333-101.33333334c15.04-15.04 23.68-34.45333333 23.68-56s-8.64-40.96-23.68-56-34.56-21.54666667-56.10666666-21.54666666z m45.33333333 122.77333333l-101.33333333 101.33333333c-12.90666667 12.90666667-28.05333333 19.41333333-45.22666667 19.41333334s-32.32-6.50666667-45.33333333-19.41333334c-25.81333333-25.81333333-25.81333333-66.77333333 0-90.56l101.33333333-101.22666666c12.90666667-12.90666667 28.05333333-19.41333333 45.22666667-19.41333334s32.32 6.50666667 45.33333333 19.41333334 19.41333333 27.94666667 19.41333333 45.22666666-6.50666667 32.32-19.41333333 45.22666667z m0 0" fill="#888888"></path><path d="M457.38666667 603.62666667a50.45333333 50.45333333 0 0 0-36.69333334 15.04l-32.32 32.32c-2.13333333 2.24-2.13333333 4.37333333 0 6.50666666 0 0 2.13333333 2.13333333 4.26666667 2.13333334s2.24 0 4.37333333-2.13333334l32.32-32.32c8.64-8.64 17.17333333-12.90666667 28.05333334-12.90666666s21.54666667 4.26666667 27.94666666 12.90666666c2.13333333 2.13333333 4.37333333 2.13333333 6.50666667 0s2.13333333-4.26666667 0-6.50666666c-8.64-8.53333333-19.41333333-15.04-34.45333333-15.04zM312.96 713.49333333a61.12 61.12 0 0 0 0 86.29333334c10.77333333 10.77333333 25.81333333 17.17333333 43.09333333 17.17333333s32.32-6.4 43.09333334-17.17333333l47.36-47.46666667-86.18666667-86.18666667zM673.49333333 671.36a25.6 25.6 0 0 0-10.77333333-10.77333333q-16.10666667-9.70666667-32.32 0c-12.90666667 6.50666667-27.94666667 12.90666667-27.94666667 32.32 0 4.37333333 2.13333333 10.77333333 4.26666667 15.14666666 12.90666667 21.54666667 23.68 43.09333333 36.69333333 64.64 2.13333333 6.4 4.26666667 4.26666667 8.53333334 2.13333334 17.28-10.77333333 34.56-19.41333333 51.73333333-28.05333334 4.37333333-2.13333333 6.50666667-4.26666667 2.24-10.77333333a446.50666667 446.50666667 0 0 0-32.42666667-64.64zM653.44 791.14666667c13.01333333 21.54666667 23.78666667 40.96 34.56 62.50666666 8.53333333 12.90666667 19.30666667 21.54666667 32.32 17.17333334 19.30666667-6.4 36.58666667-17.17333333 36.58666667-34.45333334v-2.13333333c0-4.26666667 0-8.64-4.26666667-12.90666667-13.01333333-21.54666667-25.92-45.33333333-36.69333333-66.88-2.13333333-4.26666667-2.13333333-6.4-6.4-4.26666666-17.28 10.77333333-34.56 19.41333333-53.97333334 30.18666666-6.4 2.13333333-6.4 4.26666667-2.13333333 10.77333334zM601.70666667 791.14666667c-34.45333333 15.04-66.77333333 28.05333333-101.22666667 43.09333333-8.64 4.26666667-8.64 6.50666667-2.24 12.90666667 13.01333333 15.14666667 30.18666667 23.68 49.6 23.68 38.82666667 0 71.14666667-36.58666667 64.64-73.28 0-6.4-4.26666667-8.53333333-10.77333333-6.4zM526.29333333 745.92c-25.81333333 8.53333333-40.96 32.32-43.09333333 60.26666667v4.37333333c0 12.90666667 2.13333333 15.04 15.04 8.64 32.42666667-13.01333333 64.74666667-28.05333333 97.06666667-40.96 8.64-4.37333333 8.64-6.50666667 4.26666666-13.01333333-19.41333333-21.54666667-47.36-30.08-73.28-19.30666667z" fill="#888888"></path></svg>
            </span> -->
            <span @click="openCfmb()" style="">历史处方</span>
          </span>
        </div>
      </div>
>>>>>>> 4b0d969a5166bde7cb882eb0a25f226d8fedeecf
      <!-- <div class="c_nav"> -->
      <!-- <div><span @click="changeShowType='zhongyao'" :class="{c_nav_active: changeShowType =='zhongyao'}">中药</span></div> -->
      <!-- <div><span @click="changeShowType='xiyao'" :class="{c_nav_active: changeShowType =='xiyao'}">西药</span></div> -->
      <!-- </div> -->
    </section>

    <!-- 患者信息 -->
    <section class="c_patient_info">
      <div style="font-size:0.9rem">
        <div>
          <span>姓名：<b>{{name}}</b></span>
          <span>性别:<b>{{xb}}</b></span>
          <span>年龄:<b>{{nl}}</b></span>

        </div>

        <div>
          <span>科室：<b>{{ks}}</b></span>
          <span>日期:<b>{{riqi}}</b></span>
        </div>

        <div>
          <span>药店：<b>{{this.$route.query.ydmc}}</b></span>
          <span></span>
        </div>

      </div>
    </section>


    <!-- 开西药选项页 -->
    <transition name="fade-choose">
      <section>
        <!--
        <div class="zhongyao_c_title">
          <p>患者信息：{{name}}{{info}}</p>
        </div> -->
        <div class="zhongyao_c_title">
          <p style="font-size:0.9rem">Rp：{{'('+ybgg+')'}}<span style="float:right;color:#26a2ff">金额：{{sum1}}</span></p>
        </div>
        <div class="zhongyao_c_content">
          <ul style="max-height:42vh;overflow: auto;">
            <slip-del v-for="(item,t) in dragList1" :key="t" ref="slipDel"
              delText="删除"
              @del-click="deleteDrag(item.COUNTNUM)"
            >
              <div style="padding:0 10px">
                <div class="demo-item">
                  <span class="demospan">
                    {{t+1}} . {{item.DURGNAME}}&nbsp;&nbsp;{{item.DURGGG}}
                  </span>
                  <span style="float:right;text-align:right;width:30%">
                    <i @click="adjustNumber(item,'reduce')" class="iconfont icon-jian"></i>
                    <input v-model="item.DURGFS" class="input_number" readonly>
                    <i @click="adjustNumber(item,'add')" class="iconfont icon-jia"></i>{{item.DURGBZDW }}
                  </span>

                </div>

                <div class="daily">
                  <span>剂量<input v-model="item.DRUGDOSE" class="input_number1"/></span>

                  <el-select v-model="item.FREQUENCY" placeholder="频次">
                    <el-option
                      v-for="item in options"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                  <span style="text-align:right">
                    <i @click="adjustDay(item,'reduce')" class="iconfont icon-jian"></i>
                    <input v-model="item.TOTALDAY" class="input_number1" readonly>
                    <i @click="adjustDay(item,'add')" class="iconfont icon-jia"></i>
                    天
                  </span>
                </div>

              </div>

            </slip-del>
          </ul>
        </div>
        <div class="zhongyao_c_footer">
          <div class="searchList" v-show="showList">
            <ul>
              <li v-for="item in items2" :key="item.COUNTNUM" @click="addDrag(item)"><p>{{item.DURGNAME}}({{item.DURGGG}})</p></li>
            </ul>
          </div>
          <input type="text" placeholder="请输入药品名称的首字母" class="input_name" v-model="dragKey"
            ref="Keyboard" readonly
          >
          <!--
            单击首拼输入框，隐藏拼音按键
            @click="isshowkeyboard=!isshowkeyboard" -->
          <mt-button size="small" :type="buttStyle" @click.native="openPre()" style="width:20%;">开处方</mt-button>

          <Keyboard @keyVal="getInputValue2" v-show="isshowkeyboard"></Keyboard>
          <!--           <p><input type="button" value="开药方" class="input_search_openpre" @click="showxiyao=true"></p> -->
        </div>
      </section>
    </transition>


    <!-- 西药处方预览页 -->
    <transition name="tipMove">
      <div class="medicList" v-show="showxiyao">
        <p style="height:2.5rem;line-height:2.5rem;text-align:center;background:#26a2ff;color:#fff;font-size:0.9rem">西药处方预览页</p>
        <div class="medic_o">
          <section class="c_patient_info">
            <div style="font-size:0.9rem">
              <div>
                <span>姓名：<b>{{name}}</b></span>
                <span>性别:<b>{{xb}}</b></span>
                <span>年龄:<b>{{nl}}</b></span>

              </div>

              <div>
                <span>科室：<b>{{ks}}</b></span>
                <span>日期:<b>{{riqi}}</b></span>
              </div>
              <div>
                诊断：{{diagnosis_detail}}
              </div>
            </div>
          </section>
          <p style="font-size:0.9rem; margin-top:.5rem;">处方明细：</p>
          <ul class="checklist">
            <li v-for="(item,index) in dragList1" :key="item.id" style="width:90%">{{index+1}} . {{item.DURGNAME}}&nbsp;{{item.DURGFS}}{{item.DURGBZDW}}</li>
          </ul>
          <p class="cckb" v-if="dragList1.length==0"><i>（此处空白）</i></p>
          <p class="medic_p" style="border-top: 1px solid #f1f1f1;">
            <span>总共{{numb_zy}}剂&nbsp;（每剂 {{ dragList1.length }} 味药）</span>
<<<<<<< HEAD
            <!-- <span>附加服务:<mt-checklist v-model="fujia_list" :options="fujia_options"></mt-checklist></span> -->
            <!-- <span @click="showzhongyao=false">关闭</span> -->
=======
            <!--<span>附加服务:<mt-checklist v-model="fujia_list" :options="fujia_options"></mt-checklist></span>
            <span @click="showzhongyao=false">关闭</span> -->
>>>>>>> 4b0d969a5166bde7cb882eb0a25f226d8fedeecf
          </p>

          <p>
            医嘱：{{advice || '-'}}
          </p>
        </div>
        <div class="medic_c">
          <div>
            <span>
              医师：<b>{{docotorname}}</b>
            </span>
            <span>
              处方总金额（元）：<b>{{sum2}}</b>
            </span>
          </div>

        </div>
        <div class="medic_t">
          <!--           <p><input type="button" value="开药方" class="input_search" @click="doPrescribe"></p> -->
          <!-- <span><input type="button" value="修 改" class="input_search1_1" @click="showxiyao=false"></span>
          <span><input type="button" value="提 交" class="input_search2_1" @click="doPrescribe"></span> -->
          <mt-button type="default" @click="showxiyao=false" style="width:30%;height:33px">修  改</mt-button>
          <mt-button type="primary" @click="doPrescribe" style="width:30%;height:33px">提  交</mt-button>

        </div>
      </div>
    </transition>

    <!-- 提示框 -->
    <transition name="tipMove">
      <alert-tip :alertText="alertText" v-if="showAlert" @closeTip="closeTip"></alert-tip>
    </transition>


    <!-- 中药弹窗设置 -->
    <mt-popup v-model="popupVisible1" position="top" class="step2">
      <div style="width:90%;margin:0 auto;margin-top:5%">
        <div style="margin-bottom:4rem">
          <p style="margin-top:0.5rem;padding-bottom: 0.5rem;">诊断：
            <el-autocomplete
              clearable
              class="inline-input"
              v-model="diagnosis_detail"
              :fetchSuggestions="querySearch2"
              placeholder="请输入内容"
              @select="handleSelect"
              style="width:100%"
            ></el-autocomplete>
          </p>
          <p
            style="margin-top:0.5rem;padding-bottom: 0.5rem;"
          >医嘱：
            <!-- <mt-field class="mtInput" label="请输入医嘱" placeholder="请输入医嘱" v-model="advice"></mt-field> -->
            <el-autocomplete
              clearable
              class="inline-input"
              v-model="advice"
              popperAppendToBody:="false"
              :placement="bottom-start"
              :fetchSuggestions="querySearch"
              placeholder="请输入内容"
              @select="handleSelect"
              style="width:100%"
            ></el-autocomplete>
          </p><!--
          <p>
            <span>剂数：</span>

            <el-select v-model="numb_zy" placeholder="请选择" style="width:100%;">
              <el-option value="1">1</el-option>
              <el-option value="2">2</el-option>
              <el-option value="3">3</el-option>
              <el-option value="4">4</el-option>
              <el-option value="5">5</el-option>
            </el-select>
          </p>
<<<<<<< HEAD

          <!-- <p style="margin-top:0.5rem;">
            <span>医嘱：</span>
            <mt-field class="mtInput" label="" placeholder="请输入医嘱" v-model="advice"></mt-field>
          </p> -->

          <!--           <p style="margin-top:10px">
            <span>服务：</span>
            <mt-checklist v-model="fujia_list" :options="fujia_options"></mt-checklist>
          </p> -->
=======
            <p style="margin-top:10px">
            <span>服务：</span>
            <mt-checklist v-model="fujia_list" :options="fujia_options"></mt-checklist>
          </p>-->
>>>>>>> 4b0d969a5166bde7cb882eb0a25f226d8fedeecf

          <p style="text-align:center;margin-top:1rem;">
            <span>共有 {{ dragList1.length }} 味药</span>
          </p>
          <p class="money1">
            <!--  <span>单剂金额：{{sum1}}</span>-->
            <span>总金额：{{sum2}}</span>
          </p>
        </div>
      </div>
      <div style="bottom:0;position: fixed;width: 100%;text-align: center;margin: 5% 2%">
        <!-- <input type="button" value="取 消" class="input_search1" @click="popupVisible1=false">
        <input type="button" value="预 览" class="input_search2" @click="next"> -->
        <mt-button type="default" @click="popupVisible1=false" style="width:30%;height:33px">取  消</mt-button>
        &nbsp;&nbsp;
        <mt-button type="primary" @click="next" style="width:30%;height:33px">预  览</mt-button>
      </div>
    </mt-popup>


    <!-- 显示处方模板-->
    <mt-popup
      v-model="ifShowCfmb"
      position="right"
    >
      <div class="cfmb" @click="ifShowCfmb=false">
        <svg fill="#666" viewBox="0 0 1024 1024" class="icon" style=""
          width="20" height="20"
        ><defs><style type="text/css"></style></defs><path d="M740.072727 1024L242.036364 521.309091c-4.654545-4.654545-4.654545-13.963636 0-23.272727L740.072727 0l46.545455 46.545455-465.454546 465.454545 465.454546 465.454545-46.545455 46.545455z"></path></svg>
        <span>根据患者病情选择合适的处方</span>
      </div>
      <mt-navbar v-model="selected"><!--.mint-checklist .mint-cell
        <mt-tab-item id="0" class="hiddenShowCfmb" @click.native="ifShowCfmb=false"><div><
          <svg class="icon" style="" viewBox="0 0 1024 1024" width="15" height="15"><defs><style type="text/css"></style></defs><path d="M276.755 942.936c28.497 29.315 74.739 29.315 103.307 0l367.236-378.011c28.483-29.367 28.483-76.982 0-106.291l-367.236-377.997c-28.562-29.367-74.806-29.367-103.307 0-28.546 29.325-28.546 76.929 0 106.304l315.6 324.841-315.599 324.803c-28.545 29.367-28.544 76.973 0 106.356l0 0z"></path></svg>
          </div></mt-tab-item> -->
        <mt-tab-item id="1">历史处方</mt-tab-item>

      </mt-navbar>

      <!-- tab-container -->
      <mt-tab-container v-model="selected">
        <mt-tab-container-item id="1">
          <transition name="fade-choose">

            <div
              class="bingli_con"
              v-for="(item,index) in list1"
              :key="item.id"
              @click="gotoPrescribe(item)"
            >
              <!--  @click="goOpenPrescribe(item)" -->
              <p>
                处方号：{{item.ORDERCODE}}
                <!-- <span :class="item.PRESCRIBETYPE=='2'?'xyflag':'zyflag'"> -->
                <span>
                  <span
                    :class="{xyflag:item.PRESCRIBETYPE==2,zyflag:item.PRESCRIBETYPE==1}"
                  >{{item.PRESCRIBETYPE=='2'?'西药':'中药'}}</span>
                </span>
              </p>
              <p>
                开药时间：{{item.ORDERTIME}}
                <span></span>
              </p>
            </div>


          </transition>
        </mt-tab-container-item>

      </mt-tab-container>
    </mt-popup>


  </div>
</template>
<script>
import alertTip from '~/components/pagetwo/alertTip';
import Keyboard from '~/components/pagetwo/Keyboard';
import SlipDel from 'vue-slip-delete';
import { Toast } from 'mint-ui';

const { config } = window;
export default {
  data() {
    return {
      selected: '1', // 处方模板参考页
      ifShowCfmb: false, // 是否显示处方模板
      restaurants: [],
      advice: '',
      restaurants2: [],
      state2: '',
      fujia_list: [],
      fujia_options: [{ label: '快递费(12元／每次)', value: 12 }],
      numb_zy: '1',
      popupVisible1: false, // 显示中药设置
      popupVisible3: false,
      // buttStyle: 'default', // 输入前：default, 输入后：primary
      ybgg: '药品规格',
      ybNum: '46546546466546',
      blNum: 'XXXX321321S3S3S213S',
      hospitalName: sessionStorage.getItem('hosName'),
      prescribeNum: '-',
      ks: '',
      ybtype: '',
      riqi: `${(new Date()).getFullYear()}-${(new Date()).getMonth() + 1 < 10 ? `0${(new Date()).getMonth() + 1}` : (new Date()).getMonth() + 1}-${(new Date()).getDate() < 10 ? `0${(new Date()).getDate()}` : (new Date()).getDate()}`,

      list: [],
      list2: [],
      name: '',
      xb: '',
      nl: '',

      info: '',
      id: '',
      isshowkeyboard: true,
      showzhongyao: false,
      showxiyao: false,
      isshowinput: false,
      ts: this.newStore(),
      durgExplain: '',
      changeShowType: 'xiyao',
      durgSl: this.$route.query.dragSl || '1',
      dragKey: '',
      showList: false,
      ifDuplicate: false,
      alertText: '您的操作可能有问题',
      showAlert: false,
      dragList1: [],
      dragList2: [],
      list1: [],
      isFold: [],
      page: 0,
      sum1: 0,

      sumt: 0,

      diagnosis_detail: '',

      docotorname: '1111',
      options: [{
        value: '一日3次',
        label: '一日3次',
      }, {
        value: '一日2次',
        label: '一日2次',
      }, {
        value: '一日1次',
        label: '一日1次',
      }, {
        value: '每四小时一次',
        label: '每四小时一次',
      }],
      value: '',
      prescribeInfo: {},
      patientInfo: {},
      userinfo: {},
    };
  },
  components: {
    alertTip,
    Keyboard,
    SlipDel,
  },

  computed: {
    sum2() {
      let v1 = 0;

      this.fujia_list.forEach((el) => {
        if (el == 10 && Number(this.numb_zy) > 0) {
          v1 += Number(this.numb_zy) * 10;
        } else {
          v1 += el;
        }
      });

      return Math.round((v1 + this.sum1 * Number(this.numb_zy)) * 100) / 100;
    },
    buttStyle() {
      if (this.dragList1.length != 0) {
        return 'primary';
      }
      return 'default';
    },

    items() {
      /* 动态判断输入框是否为空，从而判断是否显示搜索的药物列表 */

      return this.list;
    },
    items2() {
      /* 动态判断输入框是否为空，从而判断是否显示搜索的药物列表 */
      if (this.dragKey.length != 0) {
        this.showList = true;
      } else {
        this.showList = false;
      }
      return this.list2;
    },
  },
  /**
   * 解决苹果手机，弹出的键盘使页面元素错位后不能自动恢复位置
   */
  watch: {
    diagnosis_detail(curVal, oldVal) {
      console.log(`${curVal}  ${oldVal}`);
      window.scroll(0, 0);
    },
    advice(curVal, oldVal) {
      console.log(`${curVal}  ${oldVal}`);
      window.scroll(0, 0);
    },
  },
  created() {
    this.getlist();
    if (this.$route.query.prescribeInfo) {
      this.prescribeInfo = JSON.parse(this.$route.query.prescribeInfo);
    } else {
      this.prescribeInfo = undefined;
    }

    this.patientInfo = JSON.parse(this.$route.query.patientInfo);
    this.userinfo = JSON.parse(localStorage.getItem(`userInfo.${config.LT}`));
  },
  mounted() {
    this.restaurants = [
      { value: '空腹服用' },
      { value: '饭后服用' },

    ];
    this.restaurants2 = [
      { value: '胃疼' },
      { value: '头痛' },

    ];
    this.list1 = [];

    if (false) {
      const draglistt = this.prescribeInfo.DURGLIST;
      draglistt.split(',').forEach((el) => {
        const tdurg = {};
        tdurg.DURGID = el.split('#')[1];
        tdurg.DURGNAME = el.split('#')[2];
        tdurg.DURGDJ = el.split('#')[4];
        tdurg.DURGFS = el.split('#')[5];
        tdurg.DURGBZDW = el.split('#')[6];
        tdurg.DRUGDOSE = el.split('#')[7];
        tdurg.FREQUENCY = el.split('#')[8];
        tdurg.TOTALDAY = el.split('#')[9];
        this.sum1 += Number(el.split('#')[3]);
        this.dragList1.push(tdurg);
      });
      this.riqi = this.prescribeInfo.OPENTIME;
      this.ybtype = this.ybNum == '' ? '自费' : '医保';
      this.name = this.prescribeInfo.patientName;

      // this.fujia_list = this.prescribeInfo.PRESCRIBEEXPLAIN;
      this.numb_zy = this.prescribeInfo.AGENTQTY;
      this.sum2 = this.prescribeInfo.JE;
      this.advice = this.prescribeInfo.JE;

      this.ks = this.prescribeInfo.SSKBMC;
      this.diagnosis_detail = this.prescribeInfo.diagnosis_detail;
      this.doctorname = this.prescribeInfo.docname;
      this.ybNum = this.prescribeInfo.patient_healthcard;
      this.xb = this.prescribeInfo.PATSEX;
      this.nl = this.prescribeInfo.PATNL;
    } else {
      console.log(this.patientInfo);

      this.ybNum = this.patientInfo.PATIENT_HEALTHCARD;
      this.ybtype = this.ybNum == '' ? '自费' : '医保';
      this.name = this.patientInfo.PATNAME;
      this.xb = this.patientInfo.PATSEX;
      this.nl = this.patientInfo.PATNL;
      this.docname = this.userinfo.docname;
      this.ks = this.userinfo.ks;
    }

    this.hospitalName = this.userinfo.hospital;
  },
  destroyed() {
    this.$root.showfooter = true;
  },
  methods: {
    openCfmb() { /* 显示处方模板 */
      this.getbingliList(true);
      this.ifShowCfmb = true;
    },
    querySearch(queryString, cb) {
      const restaurants = this.restaurants;
      const results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    querySearch2(queryString, cb) {
      const restaurants = this.restaurants2;
      const results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter(queryString) {
      return restaurant => (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
    },

    handleSelect(item) {
      console.log(item);
      window.scroll(0, 0);
    },
    loadMore() {
      this.busy = true;
      setTimeout(() => {
        this.page += 1;
        this.getbingliList(true);
      }, 500);
    },
    getbingliList(flag) {
      const req = JSON.stringify({
        OTRequest: {
          VERSION: '1.0',
          TN: 'F27.APP.01.20',
          CLIENTID: 'YLAPP',
          RYBID: 'DOCTOR',
          TOKEN: `${sessionStorage.getItem('rybToken')}`,
          DATA: {
            rowsperpage: '100',
            page: `${this.page}`,
            patientId: this.$route.query.id,
            prescribeType: '2',
          },
        },
      });

      this.spost(this.ts, '/doctor/AppMainServlet.ap', {
        '': req,
      }).then((ts) => {
        // this.list1 = ts.d.DATAOBJ.DATA.reverse();
        for (let i = 0; i < ts.d.DATAOBJ.DATA.length; i += 1) {
          this.isFold.push(true);
        }
        if (flag) {
          this.list1 = this.list1.concat(ts.d.DATAOBJ.DATA);
          if (ts.d.DATAOBJ.DATA.length == 0) {
            this.busy = true;
            this.loadingText = '没有更多数据';
          } else {
            this.busy = false;
            this.loadingText = '加载中...';
          }
        } else {
          this.list1 = ts.d.DATAOBJ.DATA;
          this.busy = false;
        }
      });
    },

    next() {
      this.showxiyao = true;
      this.popupVisible1 = false;
    },
    next1() {
      this.showzhongyao = false;
      this.showxiyao = true;
      this.popupVisible3 = false;
    },
    openPre() {
      if (this.dragList1.length == 0) {
        Toast({
          message: '未选择任何药品',
          duration: 1500,
        });
      } else {
        this.popupVisible1 = true;
      }
    },
    getlist() {
      if (this.$route.query.prescribeType == '1') {
        this.changeShowType = 'zhongyao';
        this.dragList1 = this.$route.query.dragList;
      } else if (this.$route.query.prescribeType == '2') {
        this.dragList2 = this.$route.query.dragList;
        this.changeShowType = 'xiyao';
      } else {
        this.changeShowType = 'zhongyao';
      }
    },
    changeInput() { /* 备用，隐藏输入框 */
      this.isshowkeyboard = !this.isshowkeyboard;
    },
    showInput() {
      this.isshowkeyboard = false;
    },

    getInputValue2(val) {
      if (val === 'delete') {
        this.dragKey = this.dragKey.slice(0, this.dragKey.length - 1);
      } else {
        this.dragKey += val;
      }
      this.getyaopin2(this.dragKey);
    },
    adjustNumber(item, fn) {
      if (this.changeShowType == 'zhongyao') {
        this.dragList1.forEach((element) => {
          if (element.DURGID == item.DURGID) {
            if (fn == 'add') {
              element.DURGFS++;
              this.sum1 = Math.round((this.sum1 + parseFloat(item.DURGDJ)) * 100) / 100;
            } else {
              if (element.DURGFS == 1) {
                this.showAlert = true;
                this.alertText = '数量不能小于1';
                return;
              }
              element.DURGFS--;
              this.sum1 = Math.round((this.sum1 - parseFloat(item.DURGDJ)) * 100) / 100;
            }
          }
        });
      } else {
        this.dragList2.forEach((element) => {
          if (element.DURGID == item.DURGID) {
            if (fn == 'add') {
              element.DURGFS++;
              this.sum1 = Math.round((this.sum1 + parseFloat(item.DURGDJ)) * 100) / 100;
            } else {
              if (element.DURGFS == 1) {
                this.showAlert = true;
                this.alertText = '数量不能小于1';
                return;
              }
              element.DURGFS--;
              this.sum1 = Math.round((this.sum1 - parseFloat(item.DURGDJ)) * 100) / 100;
            }
          }
        });
      }
    },
    adjustDay(item, fn) {
      this.dragList1.forEach((element) => {
        if (element.DURGID == item.DURGID) {
          if (fn == 'add') {
            element.TOTALDAY++;
          } else {
            if (element.TOTALDAY == 1) {
              this.showAlert = true;
              this.alertText = '天数不能小于1';
              return;
            }
            element.TOTALDAY--;
          }
        }
      });
    },
    getyaopin(dragKey) {
      const req = JSON.stringify({
        OTRequest: {
          VERSION: '1.0',
          TN: 'F27.APP.01.24',
          CLIENTID: 'YLAPP',
          RYBID: 'DOCTOR',
          TOKEN: `${sessionStorage.getItem('rybToken')}`,
          DATA: {
            keyWord: dragKey,
            durgType: '1',
            rowsperpage: '20',
            pageno: '1',
            ordercolumn: 'durgId',
            ordertype: 'asc',
            ayid: this.$route.query.ayid,
          },
        },
      });

      this.spost(this.ts, '/doctor/AppMainServlet.ap', {
        '': req,
      }).then((ts) => {
        this.list = ts.d.DATAOBJ.DATA;
      });
    },
    getyaopin2(dragKey) {
      const req = JSON.stringify({
        OTRequest: {
          VERSION: '1.0',
          TN: 'F27.APP.01.24',
          CLIENTID: 'YLAPP',
          RYBID: 'DOCTOR',
          TOKEN: `${sessionStorage.getItem('rybToken')}`,
          DATA: {
            keyWord: dragKey,
            durgType: '2',
            rowsperpage: '20',
            pageno: '1',
            ordercolumn: 'durgId',
            ordertype: 'asc',
          },
        },
      });

      this.spost(this.ts, '/doctor/AppMainServlet.ap', {
        '': req,
      }).then((ts) => {
        this.list2 = ts.d.DATAOBJ.DATA;
      });
    },
    closeTip() {
      this.showAlert = false;
    },
    deleteDrag(COUNTNUM) {
      const deleteMes = window.confirm('确认删除？');
      if (deleteMes == true) {
        for (let i = 0; i < this.dragList1.length; i += 1) {
          if (this.dragList1[i].COUNTNUM == COUNTNUM) {
            this.sum1 = Math.round((this.sum1 - this.dragList1[i].DURGDJ * this.dragList1[i].DURGFS) * 100) / 100;
            this.dragList1.splice(i, 1);
          }
        }
      }
    },
    doPrescribe() {
      if (this.dragList1.length == 0) {
        this.showAlert = true;
        this.alertText = '未选取任何药品！';
      } else {
        console.log(JSON.stringify(this.fujia_list));
        const res = JSON.stringify({
          OTRequest: {
            VERSION: '1.0',
            TN: 'F27.APP.01.25',
            CLIENTID: 'YLAPP',
            RYBID: 'DOCTOR',
            TOKEN: `${sessionStorage.getItem('rybToken')}`,
            DATA: {
              PATIENTID: this.patientInfo.PATIENTID,
              DURGTYPE: '2',
              PRESCRIBEEXPLAIN: JSON.stringify(this.fujia_list),
              PRESCRIBENUM: '1',
              JE: `${this.sum2}`,
              DurgList: this.dragList1,
              AYID: this.$route.query.ayid,
              YDMC: this.$route.query.ydmc,
              YDDZ: this.$route.query.yddz,
              YDDH: this.$route.query.yddh,
              agentqty: this.numb_zy,
              advice: this.advice,
              versionNum: '1.2',
              SSKBMC: this.ks,
              diagnosis_detail: this.diagnosis_detail,
              docname: this.doctorname,
              patient_healthcard: this.ybNum,
              acno: this.prescribeNum,
              METHOD: '', // 处方做法
              YF: '', // 处方用法
              BUS_TYPE: 'cf', // 订单类型( cf：处方，gh：挂号，yy：预约，jc：检查 )
            },
          },
        });
        console.log(res);
        // return;

        this.spost(this.ts, '/doctor/AppMainServlet.ap', {
          '': res,
        }).then(() => {
          this.showAlert = true;
          this.alertText = '成功提交中药药方！';
          this.$router.push({ name: 'curePatient', query: { patientInfo: JSON.stringify(this.patientInfo) } });
        }).catch((ts) => {
          console.log(`未成功保存处方：${JSON.stringify(ts.d)}`);
        });
      }
    },

    addDrag(item) {
      this.checkDrag(item);

      if (!this.ifDuplicate) {
        item.COUNTNUM = 10;
        item.COUNTNUM = (this.dragList1.length + 1).toString();
        this.dragList1.splice(0, 0, item);
        this.sum1 = Math.round((this.sum1 + parseFloat(item.DURGDJ)) * 100) / 100;
        item.DRUGDOSE = '1';
        item.FREQUENCY = '一日3次';
        item.TOTALDAY = '1';
      }
      this.ifDuplicate = false;
      this.dragKey = '';
    },
    gotoPrescribe(item) {
      this.dragList1 = [];
      item.DURGLIST.split(',').forEach((el) => {
        const t_durg = {};
        t_durg.DURGID = el.split('#')[1];
        t_durg.DURGNAME = el.split('#')[2];
        t_durg.DURGDJ = el.split('#')[4];
        t_durg.DURGFS = el.split('#')[5];
        t_durg.DURGBZDW = el.split('#')[6];
        t_durg.DRUGDOSE = el.split('#')[7];
        t_durg.FREQUENCY = el.split('#')[8];
        t_durg.TOTALDAY = el.split('#')[9];
        this.sum1 += Number(el.split('#')[3]);
        this.dragList1.push(t_durg);
      });
      this.ifShowCfmb = false;
    },
    checkDrag(item) {
      if (this.changeShowType == 'zhongyao') {
        this.dragList1.forEach((e) => {
          if (item.DURGID == e.DURGID) {
            // this.showAlert = true;
            // this.alertText = '不能重复添加相同药品';
            this.ifDuplicate = true;
            Toast('不能重复添加相同药品');
          }
        });
      } else {
        this.dragList2.forEach((e) => {
          if (item.DURGID == e.DURGID) {
            // this.showAlert = true;
            // this.alertText = '不能重复添加相同药品';
            this.ifDuplicate = true;
            Toast('不能重复添加相同药品');
          }
        });
      }
    },
  },
};
</script>

<style scoped>
.daily>>>.el-input__icon{
  line-height: 30px
}
.daily>>>.el-input--suffix .el-input__inner{
  height: 30px;
  line-height: 30px
}
.daily{
  height: 35px;
  line-height: 30px;
  display: flex;
  justify-content: space-between
}
.checklist{
  /* border-top: 1px solid #f1f1f1; */
  margin-bottom: 3rem
}
.money1{
  display: flex;
  justify-content: space-between;
  padding: 0 0.2rem;
  margin-top: 1rem;
  color: #26a2ff
}
.mint-cell-wrapper{
  font-size: 0.9rem;
}
.mint-checklist .mint-cell{
  display: inline-block
}
.numb_zy{
  font-size: 0.9rem
}
* {
  margin: 0;
  padding: 0;
}
.opFix1{
  /* position:fixed; */
  background: #fff;
  width: 100%;
}
.cfmb{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: .5rem;
}
.cfmb span{
  color: #999;
  font-size: .9rem;
}
.mint-navbar .mint-tab-item:first-child{
  width: 5%;
}
.mint-popup-right {
  /* top: 8%; */
  width: 100%;
  height: 100%;
  right: 0;
  bottom: auto;
  left: auto;
  -webkit-transform: translate3d(5, -50%, 0);
  transform: translate3d(5, -50%, 0);
  text-align: left;/*
  -webkit-box-shadow: 0px 2px 10px #c8c8c8;
  -moz-box-shadow: 0px 2px 10px #c8c8c8;
  box-shadow: -1px 0px 10px #ccc; */
  opacity: 1;
}
.mint-popup-right p{
  color: #666;
  font-size: .9rem;
  text-align: center;

}
.el-select .el-input .el-select__caret{
  height: 30px;
  line-height: 30px;
}
.mint-cell-wrapper {    /* 隐藏服务项目下边线 */
  background-image: none;
}
.mint-cell:last-child{  /* 隐藏医嘱下边线 */
  background-image: none;
}
.input_search1_1 {
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  background: #ccc;
  border: 1px solid #dcdfe6;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  font-weight: 500;
  padding: 0.6rem 2rem;
  border-radius: 4px;
  width: 75%;
  margin-top: 0.1rem;
  margin-right: 5%;
}
.input_search2_1 {
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  background: #3190e8;
  border: 1px solid #dcdfe6;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  font-weight: 500;
  padding: 0.6rem 2rem;
  border-radius: 4px;
  width: 75%;
  margin-top: 0.1rem;
  margin-right: 5%;
}
.bingli_con {
  border: 1px solid #f1f1f1;
  margin: 0.5rem auto;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background-color: #fff;
  color: #999;
  width: 90%;
  text-align: left
}
.bingli_con p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #666;
  text-align: left
}
.bingli_con p:first-child {
  font-size: 0.9rem;
  color: #26a2ff;
}
.bingli_con p span {
  float: right;
  text-overflow: ellipsis;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  -webkit-text-overflow: ellipsis;
  -moz-text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  overflow: hidden;
}
.input_search1 {
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  background: #ccc;
  border: 1px solid #dcdfe6;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  font-weight: 500;
  padding: 0.6rem 2rem;
  border-radius: 4px;
  width: 40%;
  margin-top: 0.1rem;
  margin-right: 5%;
}
.input_search2 {
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  background: #3190e8;
  border: 1px solid #dcdfe6;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  font-weight: 500;
  padding: 0.6rem 2rem;
  border-radius: 4px;
  width: 40%;
  margin-top: 0.1rem;
  margin-right: 5%;
}
.select_c {
  width: 65%;
  padding: 2%;
  font-size: 0.9rem;
  outline: none;
  border-radius: 0.2rem;
  /* appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none; */
}
.select_c option {
  line-height: 20px;
  border: 0;
  padding: 1rem;
}
.select_c option:hover {
  background: #ebccd1;
}
.step2 {
  margin-top: 15%;
  border-radius: 0.2rem;
  width: 90%;
  /* margin-bottom: 76%; */
}
.zhongyao{
  border-top: .5px dashed #ccc;
  margin-top: .5rem;
}
label{
  margin-bottom: 0;
}
.c_patient_info {
  display: flex;
  justify-content: center;
  font-size: .9rem;
  letter-spacing: .05rem;
  background-color: #fff;
  padding: 0 .5rem;
  padding-bottom: .5rem;
  height: auto;
  color: #333;
  margin-top: 0.6rem;
  border-bottom: dashed .5px #ccc;
}
.c_patient_info b {
  font-weight: normal;
  color: #888;
}
.c_patient_info div {
  width: 100%;
}
.c_patient_info div div{
  display: flex;
  flex-flow: row | nowrap;
  justify-content: space-between;
  width: 100%;
}
.c_bh {
  color: #666;
  padding: .3rem;
}
.c_bh div span:first-child{
  z-index: 888;
  line-height: 1rem;
  vertical-align: middle;
}
.medicList{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* 带好盖住后面的内容 */
  z-index: 888;
  overflow: auto;
  background: #fff;
  /* padding:.5rem; */
  font-size: .9rem;
  color: #333;
}
.medicList ul li{
  line-height: 2rem;
  padding-left: 1rem;
  display: inline-flex;
  font-size: 0.9rem;
}
.cckb{
  text-align: center;
  color: #ccc;
}
.medic_o{
  height: 80%;
  overflow: auto;
  padding: .5rem;
}
.medic_o p:first-child {
  text-align: center;
}
.medic_t{
  position: fixed;
  bottom: 0;
  z-index: 999;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  padding: .5rem;
}
.medic_t span{
  display: flex;
  justify-content: center;
  flex-direction: row;
  justify-content: center;
  width: 100%;
}
.medic_c{
  height: 10%;
  border-top: 1px dashed #ccc;
  /* border-bottom: 1px solid #fff; */
  padding: .5rem;
}
.medic_c div{
  display: flex;
  line-height: normal;
  flex-flow: row | nowrap;
  justify-content: space-between;
  align-items: stretch;
}
.medic_c div span{
  color: #999;
}
.medic_c div span b{
  color: #333;
}
.medic_p{
  position: relative;
  bottom: 0;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 3rem;
}
.medic_p span{
  display: flex;
  line-height: 1.5rem;

}
.s_input{
  width: 90%;
  height: 12rem;
  background: #f1f1f1;
  position: absolute;
  top: -400%;
  margin: 0 5%;
}
.s_input .s_text{
  border: none;
  width: 80%;
  font-family: "Microsoft Yahei";
  color: #333;
  outline: none;
  text-indent: 1rem;
  line-height: 2rem;
  margin-top: 10%;
  cursor: pointer;
}


.c_nav_hospitalname {
  letter-spacing: .05rem;
  display: flex;
  justify-content: center;
  background-color: #fff;
  padding: 0rem;
  height: 2rem;
  color:#333;
  text-align: center;
  /* font-weight: bolder; */
}
.c_nav_hospitalname div:first-child {
  width: 100%;
}
.c_nav_hospitalname .hosname{
  padding: 0 12px;
  height: 33px;
  line-height: 33px;
  font-size: 18px;
  vertical-align: middle;
  border-radius: 4px;
  margin-right: .3rem;
}


.c_nav_chufang{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.c_nav_chufang span{
  width: 33%;
  text-align: center;
}
.c_nav_chufang span:nth-child(3){
  text-align: right;
}

.c_nav_lishichufang{
  padding: 5px;
  background-color: #26a2ff;
  background: #3190e8;
  border-radius: 0.2rem;
  color: #fff;
  margin-right: .5rem;
}

.c_nav {
  display: flex;
  justify-content: space-around;
  background-color: #fff;
  padding: 1rem;
  border-bottom: 1px solid #ebebeb;
  position: relative;
  height: 3rem;
}
.c_nav_active {
  color: #3190e8;
  border-bottom: 2px solid #3190e8;
}
@keyframes tipMove {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.8);
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.fade-choose-enter-active,
.fade-choose-leave-active {
  transition: opacity 0.2s;
}
.fade-choose-leave,
.fade-choose-leave-active {
  display: none;
}
.fade-choose-enter,
.fade-choose-leave-active {
  opacity: 0;
}
.zhongyao_c_title p {
  font-family: "Microsoft Yahei";
  color: #666;
  margin-bottom: 0;
  padding: 0.4rem;
  font-size: .9rem;
}
.zhongyao_c_content {
  height: 22rem;
  overflow: auto;
  position: relative;
  font-size: 0.9rem;
  color: #333;

}

.zhongyao_c_content .m-slide .m-slide__del-red{
  background: #3190e8;
  border-radius: 0.2rem;
  width: 4rem;
  height: 1.4rem;
  border: none;
  margin-top: 0.1rem;
}
.zhongyao_c_content ul li {
  list-style: none;
  font-size: 0.9rem;
  height: 2.5rem;
  width: 100%;
  overflow: hidden;
}
.zhongyao_y {
  font-family: "Microsoft Yahei";
  color: #333;
  float: left;
  width: 65%;
  overflow: auto;
}
.zhongyao_c {
  float: right;
  width: 35%;
  overflow: hidden;
  text-align: right;
  height: 30px;
  line-height: 30px;
}
.demo-item{
  width: 100%;
  height: 30px;
  line-height: 30px;
    overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
  /* display: flex;
  justify-content: space-between */
}
.demospan{
  width: 70%;
  overflow: hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
}
.zhongyao_c i {
  padding: 0.2rem;
  font-size: 0.9rem;
}
.input_number {
  border: none;
  width: 40%;
  text-align: center;
  font-family: "Microsoft Yahei";
  color: #333;
  background: #f1f1f1;
  border-radius: 0.4rem;
  outline: none
}
.input_number1 {
  border: none;
  width: 35%;
  text-align: center;
  font-family: "Microsoft Yahei";
  color: #333;
  background: #f1f1f1;
  outline: none;
  border-radius: 0.4rem;
}
.input_n {
  border: none;
  border-bottom: 2px solid #f1f1f1;
  width: 16%;
  font-family: "Microsoft Yahei";
  color: #333;
  outline: none;
  height: 2rem;
  margin: 0 0.1rem;
  text-align: center;
  float: right;
}
.buttonRemove {
  padding: 0 0.2rem;
  border: none;
  float: right;
  background: #3190e8;
  color: #fff;
  border-radius: 0.2rem;
  margin-right: 0.2rem;
}
.zhongyao_c_footer {
  position: fixed;
  bottom: 0;
  text-align: left;
  width: 100%;
  background: #fff;
  z-index: 188;
}
.zhongyao_c_footer p{
  margin-bottom: 0;
}
.input_name {
  text-indent: .5rem;
  border: none;
  width: 80%;
  text-align: left;
  font-family: "Microsoft Yahei";
  color: #333;
  outline: none;
  padding:0.5rem 0;
  margin-bottom: 0.2rem;
  font-size: .9rem;
  /* border-bottom: 2px solid #f1f1f1; */
}
.input_tip {
  width: 100%;
  font-family: "Microsoft Yahei";
  color: #333;
  text-indent: 0.5rem;
  line-height: 2rem;
  border:none;
  outline: none;
}
.input_tip:focus{
  background: #3190e84d;
}
.input_search_openpre {
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  background: #3190e8;
  border: 1px solid #dcdfe6;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  font-weight: 500;
  padding: 0.6rem 2rem;
  border-radius: 4px;
  width: 20%;
  margin-top: 0.1rem;
}
.input_search {
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  background: #3190e8;
  border: 1px solid #dcdfe6;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  font-weight: 500;
  padding: 0.6rem 2rem;
  border-radius: 4px;
  width: 100%;
  margin-top: 0.1rem;
}
.searchList {
  width: 100%;
  background: #fff;
  display: inline-block;
  overflow: auto;
  z-index: 100;
  height: 20rem;
  border-bottom: 1px solid #f1f1f1;
  text-indent: .5rem;
  padding-left: .3rem;
  padding-right: .3rem;
  border-radius: 10px;
  color: #000;
  -webkit-box-shadow: 0px -3px 10px #ccc;
  -moz-box-shadow: 0px -3px 10px #ccc;
  box-shadow: 0px -3px 10px #ccc;
  /*
  -webkit-transform: translate3d(5, -50%, 0);
  transform: translateY(0%); */
}
.searchList ul {
  margin-bottom: 0;
}
.searchList ul li {
  font-size: 0.9rem;
  height: 2rem;
  border-bottom: 1px solid #ccc;
  line-height: 2rem;
  text-align: left;
  width: 100%;
  overflow: hidden;
}
.el-select-dropdown__item {
  text-align: center;
}

.mint-field .mint-cell-title{
  display: none;
}

.mint-field .mint-cell-value{
  margin-left: -0.5rem;
}


.mint-field-core{
  color: #606266;
}
</style>
